import React from "react";
import { Space, Table, Tag } from "antd";

const { Column, ColumnGroup } = Table;

interface StudentType {
    name: string;
    age: number;
    gender: string;
}
function List({ students }: any) {
    return (
        <Table dataSource={students}>
            <Column title="姓名" dataIndex="name" key="name" />
            <Column title="年龄" dataIndex="age" key="age" />
            <Column title="性别" dataIndex="gender" key="gender" />

            <Column
                title="Action"
                key="action"
                render={(_: any, record: StudentType) => (
                    <Space size="middle">
                        <a>修改</a>
                        <a>删除</a>
                    </Space>
                )}
            />
        </Table>
    );
}
export default List;
